<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" id="update">
  <div class="modal-dialog modal-lg modal-lg-f institution-modal" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title pull-left">机构管理 — 修改</h4>
      </div>
      <form #editForm="ngForm" novalidate>
        <div class="popup-body modal-body text-center">
          <div class="bg-model overflow-hide" *ngIf="getTabVal">
            <!-- <div class="col-xs-12 col-sm-12 padding-0">
              
            </div> -->
            <div class="col-xs-12 col-sm-6">
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">上级机构：</label>
                <div class="col-xs-12 col-sm-9">
                  <p>{{superiorUpdate}}</p>
                </div>
              </div>
              <div class="form-group">
                <label class="col-xs-12 col-sm-3 control-label text-right">机构名称：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="institutionName" #institutionName=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.institutionName">
                  <label class="red required">*</label>
                </div>
              </div>

              <div class="form-group">
                <label class="col-xs-12 col-sm-3 control-label text-right">显示名称：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="institutionDisplayName" #institutionDisplayName=ngModel class="form-control" autocomplete="off"
                    [(ngModel)]="getTabVal.institutionDisplayName" />
                  <label class="red required">*</label>
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">到期日期：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="validDate" #validDate=ngModel class="form-control" autocomplete="off" required [(ngModel)]="getTabVal.validDate"
                    #dp="bsDatepicker" bsDatepicker [bsConfig]="{ dateInputFormat: 'YYYY-MM-DD'}" />
                  <label class="red required">*</label>
                </div>
              </div>




              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">机构类型：</label>
                <div class="col-xs-12 col-sm-9">
                  <select name="institutionType" #institutionType=ngModel class="pull-left" [(ngModel)]="getTabVal.institutionType">
                    <option value="0">客户机构</option>
                    <option value="1">代理商</option>
                    <option value="2">应用提供商</option>
                    <option value="3">供应商</option>
                  </select>
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">服务类型：</label>
                <div class="col-xs-12 col-sm-9">
                  <select name="jgServerType" class="pull-left" #jgServerType=ngModel [(ngModel)]="getTabVal.jgServerType" required>
                    <!-- <option value=null>请选择</option> -->
                    <option value="0">线上图书馆</option>
                    <option value="1">镜像图书馆</option>
                    <option value="2">线上/镜像图书馆</option>
                  </select>
                </div>
                <div *ngIf="jgServerType.invalid && (jgServerType.touched)" class="error-alert">
                  <div *ngIf="jgServerType.errors.required">
                    <small class="error">请选择服务类型</small>
                  </div>
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">机构状态：</label>
                <div class="col-xs-12 col-sm-9 text-left">
                  <!-- <select name="enabled" class="pull-left" #enabled=ngModel [(ngModel)]="getTabVal.enabled">
                    <option value="0">禁用</option>
                    <option value="1">启用</option>
                  </select> -->
                  <label class="toggle toggle-positive">
                    <input type="checkbox" name="enabled" #enabled=ngModel [(ngModel)]="getTabVal.enabled">
                    <div class="track">
                      <div class="tit" *ngIf="getTabVal.enabled">启用</div>
                      <div class="tit right" *ngIf="!getTabVal.enabled">禁用</div>
                      <div class="handle"></div>
                    </div>
                  </label>
                </div>
              </div>



            </div>
            <div class="col-xs-12 col-sm-6">
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">联系人：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="contactName" #contactName=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.contactName"
                  />
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">性质：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="nature" #nature=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.nature" />
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">行业：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="industry" #industry=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.industry"
                  />
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">电话：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="phone" #phone=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.phone" />
                </div>
              </div>
              <div class="form-group ">
                <label class="col-xs-12 col-sm-3 control-label text-right">邮编：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="postcode" #postcode=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.postcode"
                  />
                </div>
              </div>
              <div class="form-group">
                <label class="col-xs-12 col-sm-3 control-label text-right">省份：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="province" #province=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.province"
                  />
                </div>
              </div>
              <div class="form-group">
                <label class="col-xs-12 col-sm-3 control-label text-right">城市：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="city" #city=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.city" />
                </div>
              </div>
              <div class="form-group">
                <label class="col-xs-12 col-sm-3 control-label text-right">地址：</label>
                <div class="col-xs-12 col-sm-9">
                  <input type="text" name="address" #address=ngModel class="form-control" autocomplete="off" [(ngModel)]="getTabVal.address"
                  />
                </div>
              </div>
            </div>
            <div class="col-xs-12 col-sm-12">
              <div class="form-group">
                <label class="col-xs-12 col-sm-2 control-label pull-left describe">描述：</label>
                <div class="pull-left describe">
                  <textarea rows="5" type="text" name="description" class="form-control" #description=ngModel autocomplete="off" minlength="0"
                    maxlength="50" [(ngModel)]="getTabVal.description" placeholder="描述长度在0-50个汉字之间"></textarea>
                  <div *ngIf="description.invalid" class="error-alert text-left">
                    <div *ngIf="description.errors.minlength || description.errors.maxlength">
                      <small class="error "> 描述长度在0-50之间</small>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class=" modal-footer">
          <button type="button" class="btn btn-fff" data-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary" [disabled]="editForm.invalid" (click)="submitEdit()"><span class="glyphicon glyphicon-pencil"></span> 修改</button>
        </div>
      </form>
    </div>
  </div>
</div>